﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TB.BLL
{
    public class UserName
    {
        private DALFactory.DALFactory dataFactory = DataProvider.DefaultProvider;
        public bool CheckUserName(string username,string pwd)
        {
            TB.Entity.username user=dataFactory.DALUserNameProvider.LoadById(username);
            if (user != null)
            {
                if (pwd == user.pwd)
                    return true;
            }
            return false;
        }

        public string GetUserPrivilege(string username,string pwd)
        {
            TB.Entity.username user=dataFactory.DALUserNameProvider.LoadById(username);
            if (user.pwd == pwd)
            {
                return user.reverse1;
            }
            return "";
        }
    }
}
